<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
  <base href="<%=basePath%>"/>
  
   <title>当当网注册页面</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.3.js"></script>
<script type="text/javascript" src="js/register.js"></script>
<script type="text/javascript">
	function changeImageCode(){
		$('#codeImage').attr('src','user/userAction!showCode?id='+new Date().getTime());
	}
</script>
</head>

<body>
<div id="header">
<div id="register_header">
   <div class="register_header_left"><img src="images/logo.gif" alt="logo" /></div>
   <div class="register_header_right"><a href="mainAction" class="blue" />首页</a> | <a href="mainAction!openProduct" class="blue">商品展示页</a>  |   <a href="user/userAction!toLogin" class="blue">登录</a></div>
   </div>
</div>
<div id="main">
  <div class="register_content">
    <div class="register_top_bg"></div> 
    <div class="register_mid_bg">
      <ul>
        <li class="register_mid_left">填写注册信息</li>
        <li class="register_mid_mid">2. 邮箱验证</li>
        <li class="register_mid_right">3. 完成注册</li>
    </ul>
    </div>
    <div class="register_top_bg_mid">
    <div class="register_top_bg_two_left"></div>
    <div class="register_top_bg_two_right"></div>
    <div class="register_title_bg"><img src="images/register_pic_02.gif" alt="欢迎注册"/>&nbsp;&nbsp;您所提供的资料不会做其他用途，敬请安心填写。</div>
    </div>
    <div class="register_dotted_bg"></div>
    <div class="register_message">
<%--    form 表单开始--%>
    <s:form action="userAction!checkLogin" id="myform" namespace="/user" onsubmit="return checkRegister();" >
     <dl class="register_row">
        <dt>Email地址：</dt>
        <dd><s:textfield id="email" cssClass="register_input" onfocus="emailFocus()" name="user.email" /></dd>
        <dd><div id="email_prompt"></div></dd>
      </dl>
      <dl class="register_row">
         <dt>设置昵称：</dt>
         <dd><s:textfield id="nickName" name="user.nickName" cssClass="register_input" onfocus="nickNameFocus()" onblur="nickNameBlur()"/></dd>
        <dd><div id="nickName_prompt"></div></dd>
      </dl>
     <dl class="register_row">
         <dt>设定密码：</dt>
         <dd><s:password id="pwd" name="user.password" cssClass="register_input" onfocus="pwdFocus()" onblur="pwdBlur()"/></dd>
         <dd><div id="pwd_prompt"></div></dd>
     </dl> 
     <dl class="register_row"> 
         <dt>再输入一次密码：</dt>
         <dd><s:password id="repwd" cssClass="register_input" onfocus="repwdFocus()" onblur="repwdBlur()"/></dd>
        <dd><div id="repwd_prompt"></div></dd>
     </dl>
      <dl class="register_row"> 
         <dt>验证码：</dt>
         <dd><img src="user/userAction!showCode" id="codeImage"/>
         	<s:textfield id="inputCode" name="codeStr" cssClass="register_input" cssStyle="width:60px;"/>
         	<a href="javascript:;" onclick="changeImageCode();">看不清楚?换一张</a>
         </dd>
        <dd><div id="imgCode_prompt"></div></dd>
     </dl>
     <%--<dl class="register_row">
        <dt>性别：</dt>
        <dd><input name="sex" id="man" type="radio" value="男"> <label for="man">男</label></dd>
       <dd> <input name="sex" id="woman" type="radio" value="女"> <label for="woman">女</label></dd>
     </dl>
     --%>
     	<%--<dl class="register_row">
        <dt>所在地区：</dt>
        <dd><select id="province" onchange="changeCity()" style="width:120px; font-size:12px;">
              <option>请选择省/城市</option>
              </select>
             </dd>
        <dd><select id="city"  style="width:130px;font-size:12px;">
            <option>请选择城市/地区</option>
          </select></dd>
      </dl>
      --%>
      <div class="registerBtn"><input id="registerBtn" type="image" src="images/register_btn_out.gif"/></div>
   </s:form>
    </div>
    
    
  </div>
  </div>
<!--网站版权部分开始-->
<div id="footer">
<iframe src="common/footer.jsp" height="50px" width="900px" frameborder="0"></iframe>
</div>
</body>
</html>